package com.safeluck.floatwindow;

import android.content.Context;
import android.content.Intent;

/**
 * aaa
 * Created by lzw on 2018/8/24. 16:26:24
 * 邮箱：632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class VideoRecorder {
    private static final VideoRecorder ourInstance = new VideoRecorder();

    private boolean isActive = false;

    public static VideoRecorder getInstance() {
        return ourInstance;
    }

    private VideoRecorder() {
    }

    public void startRecordVideo(Context context,String path){
        Intent intent = new Intent(context,FloatingService.class);
        intent.putExtra("path",path);
        context.startService(intent);
    }

    public void stopRecordVideo(Context context){

        context.stopService(new Intent(context,FloatingService.class));
    }

    public boolean isRecord(){

        return FloatingService.isActive;
    }
}
